<?php
return array_merge(array(
    'user'=>array(
        'class' => 'WebUser',
        // enable cookie-based authentication
        'allowAutoLogin'=>true,
    ),
    // uncomment the following to enable URLs in path-format

    'urlManager'=>array(
        'urlFormat'=>'path',
        'showScriptName' => false,
        'urlSuffix' => '.html',
        'rules' => array(
            '/page/<page:\d+>' => 'index/index',
            '/category/<cid:\d+>' => 'index/index',
            '/category/<cid:\d+>/page/<page:\d+>' => 'index/index',
            '/' => 'index/index',
            'post/<id>' => 'index/view',
//                'post/page/<page>' => 'index/index',
//                'category/<cid>' => 'index/index',
        )
    ),

    'format' => array(
        'datetimeFormat' => 'Y-m-d H:i:s',
        'timeFormat' => 'H:i:s',
        'dateFormat' => 'Y-m-d'
    ),

    'errorHandler'=>array(
        // use 'site/error' action to display errors
        'errorAction'=>'site/error',
    ),
    'log'=>array(
        'class'=>'CLogRouter',
        'routes'=>array(
            array(
                'class'=>'CFileLogRoute',
                'levels'=>'trace',
                'categories' => 'system.db.CDbCommand',
                'logFile' => 'db.log',
            ),
            array(
                'class'=>'CFileLogRoute',
                'levels'=>'error, warning',
            ),
            // uncomment the following to show log messages on web pages
            /*
            array(
                'class'=>'CWebLogRoute',
            ),
            */
        ),
    ),
    'cache' => array(
        'class' => 'CFileCache',
    ),
    'viewRenderer' => array(
        'class' => 'CPradoViewRenderer',
        'fileExtension' => '.tpl',
    )

), require('dbConfig.php'));